// 文章类接口
import request from '@/utils/request.js'
// 获取文章分类数据API
export const getCatListAPI = () => {
  return request.get('/my/cate/list')
}
// 添加图书API
export const addCatListAPI = (obj) => {
  return request.post('/my/cate/add', obj)
}
// 修改图书API
export const updateCateAPI = (obj) => {
  return request.put('/my/cate/info', obj)
}
// 删除图书API
export const deletCateAPI = (id) => {
  return request.delete('/my/cate/del', {
    params: { id }
  })
}
// 发表文章的API
export const pubArticleAPI = (fd) => {
  return request.post('/my/article/add', fd)
}
// 获取文章列表数据的API
export const initArticleAPI = (q) => {
  return request.get('/my/article/list', {
    params: q
  })
}
// 获取文章详情的API
export const getArticleAPI = (id) => {
  return request.get('/my/article/info', {
    params: { id }
  })
}
// 删除文章API
export const deleteArticleAPI = (id) => {
  return request.delete('/my/article/info', {
    params: { id }
  })
}
